<?php

/**
 * 分类标签
 * Some rights reserved：rfcsite.com
 * Contact email:458481812@qq.com
 */
namespace Home\TagLib;

class Product {
	public $db, $table_name, $modelid, $where;
	
	/**
	 * 列表
	 * 
	 * @param
	 *        	$catid
	 */
	public function index($data) {



		$map[cache]=$data[cache];
		if ($data [tui])
			$where [tui] = "1";
		if ($data [img])
			$where [thumb] = array ("neq",'');

		if ($data ["new"])
			$where ["new"] = 1;

		if ($data [img])
			$where [thumb] = array ("neq",'');
		

		
		$map[where]=$where;
		
		$map[limit] = $data ['limit']?$data ['limit']:0;
		
		$map[num]= $data ['num'] ? $data ['num'] : 20;
		
		return D("Product")->get_list($map);
	}


	

	
}
